<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 阻止 f12打开控制台 
        document.addEventListener('keydown',function(event){
            var e = event || window.event;

            return e.keyCode != 123 || (e.preventDefault());

        });

        // 禁止右键 选择 复制
        document.addEventListener('contextmenu',function(event){
            var e = event || window.event;

           return e.returnValue=false || (e.preventDefault())

        });




    </script>
</body>
</html>